/**
 * Created by zxr on 16/11/12.
 */
// openssl genrsa 1024 > key.pem 创建私钥
// openssl req -x509 -new -key key.pem > key-cert.pem 创建公钥


var https = require('https');
var fs = require('fs');

var options = {
	key : fs.readFileSync('./key.pem'),
	cert : fs.readFileSync('./key-cert.pem')
};
https.createServer(options,function(req,res){
	res.writeHead(200);
	res.end("https")
}).listen('3000');